	
	var level = 2;
	var trade_name = ['expert_treade','expert_job','trade_3th'];

	function change(obj){
		var selId = obj.find('option:selected').val();
		var next_sel ,
		    html,
			list ;
		$.ajax({
			url : trade_url,
			data :{trade_id : selId,level:level},
			dataType:'json',
			async : false,
			type :'post',
			success:function(data){
				if(data.code==200){
					list = data.trade_list;
				}else{
					list = null;
				}
			}
		})

		//下面有数据
		if(list){

			//下一个有没有选择框
			if(obj.next().is('select')){
				next_sel =	obj.next();
				next_sel.attr('name',trade_name[1]);
				next_sel.attr('id',trade_name[1]);
				$.each(list,function(i,trade){
					// console.log(trade);
					html += '<option value="'+trade.trade_id+'">'+trade.name+'</option>';
				})
				next_sel.html(html);
				next_sel.bind('change',function(){
					change($(this));
				});
				next_sel.trigger('change');
			}else{

				//下一个不是选择框
				next_sel = document.createElement('select');
				$.each(list,function(i,trade){
					var option = new Option(trade.name,trade.trade_id);
					next_sel.add(option,undefined);
				});
				next_sel.id = trade_name[1];
				next_sel.name = trade_name[1];
				obj.after($(next_sel));
				$(next_sel).bind('change',function(){
					change($(this));
				})
				$(next_sel).trigger('change');
				
			}
		}else{
			obj.nextAll('select').remove();
		}
	}
	$('select#'+[name=trade_name[0]]).change(function(){
			change($(this));	
	})

	// $('select#'+[name=trade_name[0]]).trigger('change');

